Skip to content

docs: Add SKILL.md for designing benchmark - #25285

Merged
2010YOUY01 merged 2 commits into
apache:mainfrom
2010YOUY01:doc-skill-bench
Sep 17, 2026
Merged

2010YOUY01 merged 2 commits into
apache:mainfrom
2010YOUY01:doc-skill-bench

Conversation

@2010YOUY01

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

Here is something I had in mind when designing or reviewing benchmarks. Summarize it as a doc for future reference.

What changes are included in this PR?

Add a skill for designing new benchmarks.

What is the testing strategy for this PR?

Are there any user-facing changes?

Comment thread .ai/skills/add-benchmarks/SKILL.md Outdated

## Rust microbenchmarks

TODO

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have ideas specific to Rust microbenchmarks; maybe others do and we can add them later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to remove this section entirely if we do not have the content ready. Otherwise, it may confuse agents.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Removed.

@codecov-commenter

codecov-commenter commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.28%. Comparing base (38d58ed) to head (53da0c2).
⚠️ Report is 61 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25285      +/-   ##
==========================================
+ Coverage   81.90%   82.28%   +0.37%     
==========================================
  Files        1134     1137       +3     
  Lines      425217   430211    +4994     
  Branches   425217   430211    +4994     
==========================================
+ Hits       348289   353995    +5706     
+ Misses      56288    54790    -1498     
- Partials    20640    21426     +786     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall!

Comment thread .ai/skills/add-benchmarks/SKILL.md Outdated

@jayzhan211 jayzhan211 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some suggestions

Comment thread .ai/skills/add-benchmarks/SKILL.md Outdated

1. **Isolate the operator being measured in microbenchmarks.**

When a microbenchmark targets a specific operator, keep the work done by

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Say when criterion benches are still the right tool. The repo has about 180 criterion bench files. "Prefer SQL benchmarks even for microbenchmarks" with no exceptions will clash with reviews of PRs that touch hashing, row conversion or array kernels, where SQL setup would drown out the code being measured. One sentence would cover it, e.g.: "Use a criterion bench only when the code has no SQL-reachable path, or when per-row costs are too small to see through a query.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear up the tension between the two main rules. "Benchmark at a higher level" and "isolate the operator" can read as opposite advice. Suggested wording: go in through the highest-level interface (SQL), but keep everything around the operator as cheap as possible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention expect_plan. Every nlj query has expect_plan NestedLoopJoinExec. It matters a lot: if an optimizer change turns the NLJ into a hash join, the benchmark keeps "passing" while measuring the wrong operator. I'd make it its own rule: assert the plan shape you mean to measure.

@2010YOUY01

Copy link
Copy Markdown
Contributor Author

@jayzhan211 @Xuanwo Thank you for the review.

@2010YOUY01
2010YOUY01 added this pull request to the merge queue Sep 17, 2026
Merged via the queue into apache:main with commit 5636128 Sep 17, 2026
41 checks passed
@2010YOUY01
2010YOUY01 deleted the doc-skill-bench branch September 17, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants